# Lucid is (C) Copyright 2006-2007 by Infiscape Corporation
#
# This file is part of Lucid, a PyOpenSG example application.
#
# Lucid is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# Lucid is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program.  If not, see <http://www.gnu.org/licenses/>.

from PyQt4 import QtGui, QtCore
import pycute3
import lucid.core
from pydispatch import dispatcher

class PyCutePlugin(lucid.core.IViewPlugin):
   """ Viewer to display a shell of pycute3 """
   def __init__(self):
      lucid.core.IViewPlugin.__init__(self)      
      env = lucid.core.Environment()      
      self.widget = PythonShellWidget(self)

      
   @staticmethod
   def getName():
      return "Python Shell"
      
   def getViewWidget(self):
      return self.widget
   

class PythonShellWidget(pycute3.PyCute):
   def __init__(self, plugin, locals=None, log='', parent=None):
      pycute3.PyCute.__init__(self, locals, log, parent)      
      self.plugin = plugin

   
